<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
    <script type="text/javascript">
      function *show()
      {

        alert('a');

        yield 99;

        alert('b');

        return 55;
      }

      let gen = show();
      let res1 = gen.next();
      console.log(res1);
      let res2 = gen.next();
      console.log(res2);
    </script>
  </head>
  <body>

  </body>
</html>
